<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>沂水旅游-导游详情</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/static/layuiadmin/layui/css/layui.css">
    <link rel="stylesheet" href="/static/index/css/base.css">
    <link rel="stylesheet" href="/static/index/css/my.css">

</head>
<body>

{include file="public/header" model='my' /}

{include file="public/myheader" model='orders' /}

<div class="my-box-width">
    <div class="layui-fluid">

        <div class="layui-row my-order">

            <div class="order-title">

                <div class="order-kinds order-kinds-1">
                    <a href="{:url('my/my')}">全部订单</a>
                </div>
                <div class="order-kinds order-kinds-2">
                    <a href="{:url('my/my')}?type=2">待支付</a>
                </div>
                <div class="order-kinds order-kinds-3">
                    <a href="{:url('my/my')}?type=3">待出行</a>
                </div>
                <div class="order-kinds order-kinds-4">
                    <a href="{:url('my/my')}?type=4">待评价</a>
                </div>

            </div>

            <div class="order-td-tips">

                <div class="layui-row">
                    <div class="layui-col-md2"><p>订单信息</p></div>
                    <div class="layui-col-md2"><p>类型</p></div>
                    <div class="layui-col-md2"><p>行程日期</p></div>
                    <div class="layui-col-md2"><p>支付金额</p></div>
                    <div class="layui-col-md2"><p>订单状态</p></div>
                    <div class="layui-col-md2"><p>操作</p></div>
                </div>

            </div>

            <div class="order-list-box">

                {notempty name="data"}
                {foreach $data as $k => $v}

                <div class="order-list">
                    <div class="order-the-num-time">
                        <div class="order-the-num">
                            订单号：<span id="">{$v.order_sn}</span>
                        </div>
                        <div class="order-the-time">
                            生成时间：{$v.create_time|date="Y-m-d H:i:s",###}
                        </div>
                    </div>
                    <div class="layui-row">

                        <div class="layui-col-md2">
                            <div class="order-info order-info-1">
                                <div class="order-store-name">{$v.store_name}</div>
                                <div class="order-goods-name">标准大床房×2</div>
                            </div>
                        </div>

                        <div class="layui-col-md2">
                            <div class="order-info order-info-2">
                                {switch name="v.kinds"}
                                    {case value="1"}景点门票{/case}
                                    {case value="2"}酒店订单{/case}
                                    {case value="3"}跟团游订单{/case}
                                {/switch}
                            </div>
                        </div>

                        <div class="layui-col-md2">
                            <div class="order-info order-info-3">
                                <p>使用日期：{$v.use_time|date="Y-m-d",###}</p>
                            </div>
                        </div>

                        <div class="layui-col-md2">
                            <div class="order-info order-info-4">
                                ￥{$v.order_price*1}
                            </div>
                        </div>

                        <div class="layui-col-md2">
                            <div class="order-info order-info-5">
                                {switch name="v.order_status"}
                                {case value="0"}待付款{/case}
                                {case value="1"}待出行{/case}
                                {case value="2"}已取消{/case}
                                {case value="3"}待付款{/case}
                                {case value="4"}已完成{/case}
                                {/switch}
                            </div>
                        </div>

                        <div class="layui-col-md2">
                            <div class="order-info order-info-6">
                                <a href="javascript:;">查看订单</a>
                                <a href="javascript:;">取消订单</a>
                                <a href="javascript:;">再次购买</a>
                            </div>
                        </div>


                    </div>
                </div>

                {/foreach}

                {else/}
                <div class="layui-row">
                    <div style="margin-bottom:20px;width: 100%;height: 300px;text-align: center;line-height: 300px;color: #5c5c5c;background: #fcfcfc">
                        暂无数据
                    </div>
                </div>
                {/notempty}

            </div>

        </div>

    </div>
</div>

<div style="height: 50px"></div>

{include file="public/footer"  /}

<script>
    var $ = layui.jquery;
        var layer = layui.layer
            , element = layui.element
            , laydate = layui.laydate
            , flow = layui.flow
            , form = layui.form;

        //执行一个laydate实例
        laydate.render({
            elem: '#selectDate'
            ,show: true
        });

        flow.lazyimg();


        function getQueryVariable(variable) {
            var query = window.location.search.substring(1);
            var vars = query.split("&");
            for (var i = 0; i < vars.length; i++) {
                var pair = vars[i].split("=");
                if (pair[0] == variable) {
                    return pair[1];
                }
            }
            return (false);
        }

        var type = getQueryVariable('type');

        if (type) {
            switch (type * 1) {
                case 2:
                    $('.order-kinds-2').addClass('order-kinds-active');
                    break;
                case 3:
                    $('.order-kinds-3').addClass('order-kinds-active');
                    break;

                case 4:
                    $('.order-kinds-4').addClass('order-kinds-active');
                    break;

                default:
                    $('.order-kinds-1').addClass('order-kinds-active');

            }

        } else {

            $('.order-kinds-1').addClass('order-kinds-active');

        }
</script>
</body>
</html>